package textapp.business;

import java.util.ArrayList;
import java.util.List;

import textapp.dao.GroupDao;
import textapp.dao.model.Group;

public class GroupService {
	
	public static void main(String[] args) {
//		List<Integer> idList = new ArrayList<Integer>();
//		idList.add(1);
//		idList.add(3);
//		idList.add(4);
//		
//		new GroupService().createGroup(1, "tg", 0, idList);
		
		
//		List<Integer> idList = new ArrayList<Integer>();
//		idList.add(3);
//		new GroupService().addUsersToGroup(8, idList);
//		
		
		new GroupService().deleteGroup(8);
		
	}
	
	public Group createGroup(int ownerId, String name, int type, List<Integer> idList) {
		return new GroupDao().createGroupWithMember(ownerId, name, type, idList);
	}
	
	public Group addUsersToGroup(int groupId, List<Integer> idList) {
		return new GroupDao().addUsersToGroup(groupId, idList);
	}
	
	public boolean deleteGroup(int groupId) {
		return new GroupDao().deleteGroup(groupId);
	}
}
